<!DOCTYPE HTML>
<head>
   <meta http-equiv="content-type" content="text/html" />
   <meta name="author" content="lovemoon" charset="UTF-8"/>
   <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/backend/css/bootstrap.min.css" />
   <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/backend/css/jquery.mCustomScrollbar.css" />
   <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/backend/css/jquery-ui.css" />
   <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/backend/css/form.css" />
   <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/backend/redactor/redactor.css" />
   <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/backend/css/main.css" />
   <script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/backend/js/jquery.min.js"></script>
   <script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/backend/js/bootstrap.min.js"></script>
   <script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/backend/js/jquery.mCustomScrollbar.concat.min.js"></script>
   <script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/backend/js/jquery-ui.js"></script>
   <script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/backend/redactor/redactor.min.js"></script>	
   <script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/backend/js/actions.js"></script>
   <script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/backend/js/js-function.js"></script>		
   <title><?php echo $this->pageTitle?></title>
</head>
</head>
<body>
   <div id="wapper" class="has-menu">
      <?php include ('header.inc.php')?>
      <?php include ('menu.inc.php')?>
      <div class="main-content">
         <?php
         $rights = Role::checkRight($this->id);
         //CVarDumper::dump($rights,10,true);
      ?>      
      <div class="list-actions">
         <?php if($rights['IsActive'] == 1){?>
            <div class="action-item" id="deactive">
               <img src="<?php echo Yii::app()->request->baseUrl?>/backend/images/icon-deactive.png" />
               <p>Deactive</p>
            </div>
         <?php }?>
         <?php if($rights['IsActive'] == 1){?>
            <div class="action-item" id="active">
               <img src="<?php echo Yii::app()->request->baseUrl?>/backend/images/icon-active.png" />
               <p>Active</p>
            </div>
         <?php }?>
         <?php if($rights['IsAdd'] == 1){?>
            <div class="action-item">
               <a href="<?php echo $this->createUrl($this->id.'/create')?>">
                  <img src="<?php echo Yii::app()->request->baseUrl?>/backend/images/icon-add.png" />
                  <p>Add</p>
               </a>
            </div>
         <?php }?>
         <?php if($rights['IsEdit'] == 1){?>
            <div class="action-item" id="edit">
               <img src="<?php echo Yii::app()->request->baseUrl?>/backend/images/icon-edit.png" />
               <p>Edit</p>
            </div>
         <?php }?>
         <?php if($rights['IsDelete'] == 1){?>
            <div class="action-item" id="delete">
               <img src="<?php echo Yii::app()->request->baseUrl?>/backend/images/icon-delete.png" />
               <p>Delete</p>
            </div>
         <?php }?>
      </div><!-- End list-action-->
      <div style="clear: both; <?php if($rights != false) echo 'margin-bottom: 80px;';?>"></div>
         <?php echo $content?>
      </div>
   </div>
</body>